projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
870eefc
)
babl_realloc: move destructor from original to new
author
Øyvind Kolås
<pippin@gimp.org>
Sun, 27 Jun 2010 16:48:24 +0000
(17:48 +0100)
committer
Øyvind Kolås
<pippin@gimp.org>
Sun, 27 Jun 2010 16:48:24 +0000
(17:48 +0100)
babl/babl-memory.c
patch
|
blob
|
history
diff --git
a/babl/babl-memory.c
b/babl/babl-memory.c
index 9c0b3d3e5185bc88138cfc6b95f4ab24a8b1e838..6ceca90e664526bfb5a4ad3bda65dcb794466025 100644
(file)
--- a/
babl/babl-memory.c
+++ b/
babl/babl-memory.c
@@
-232,6
+232,8
@@
babl_realloc (void *ptr,
ret = babl_malloc (size);
#endif
memcpy (ret, ptr, babl_sizeof (ptr));
+ BAI (ret)->destructor = BAI (ptr)->destructor;
+ BAI (ptr)->destructor = NULL;
babl_free (ptr);
#if BABL_DEBUG_MEM
babl_mutex_lock (babl_debug_mutex);